function createSelect(ActionFlag) 
{ 
var selYear = document.getElementById("sYear"); 
var selMonth = document.getElementById("sMonth"); 
var selDay = document.getElementById("sDay"); 
var dt = new Date();

if(ActionFlag == 1) 
{ 
MaxYear = dt.getFullYear()+1; 
MinYear = 1950;

for(var i = MaxYear; i >= MinYear; i--) 
{ 
var op = document.createElement("OPTION"); 
op.value = i; 
op.innerHTML = i; 
selYear.appendChild(op); 
} 
selYear.selectedIndex = 1;

for(var i = 1; i < 13; i++) 
{ 
var op = document.createElement("OPTION"); 
op.value = i; 
op.innerHTML = i; 
selMonth.appendChild(op); 
} 
selMonth.selectedIndex = dt.getMonth(); 
}

var date = new Date(selYear.value, selMonth.value, 0); 
var daysInMonth = date.getDate(); 
selDay.options.length = 0;

for(var i = 1; i <= daysInMonth ; i++) 
{ 
var op = document.createElement("OPTION"); 
op.value = i; 
op.innerHTML = i; 
selDay.appendChild(op); 
} 
//alert(); 
selDay.selectedIndex = dt.getDate() ; 
} 

